<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增环境数据采集')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-environment-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">终端编号：</label>
                <div class="col-sm-8">
                    <input name="imei" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">环境温度：</label>
                <div class="col-sm-8">
                    <input name="ambientTemp" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">环境湿度：</label>
                <div class="col-sm-8">
                    <input name="ambientHum" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">环境照度：</label>
                <div class="col-sm-8">
                    <input name="ambientLight" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">土壤温度：</label>
                <div class="col-sm-8">
                    <input name="soilTemp" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">土壤湿度：</label>
                <div class="col-sm-8">
                    <input name="soilHum" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">大气压力：</label>
                <div class="col-sm-8">
                    <input name="atmoPressure" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">风速：</label>
                <div class="col-sm-8">
                    <input name="windSpeed" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">风向：</label>
                <div class="col-sm-8">
                    <input name="windDirection" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">雨雪：</label>
                <div class="col-sm-8">
                    <input name="snowRain" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">pm2.5：</label>
                <div class="col-sm-8">
                    <input name="pm25" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">二氧化碳：</label>
                <div class="col-sm-8">
                    <input name="co2" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">一氧化碳：</label>
                <div class="col-sm-8">
                    <input name="co" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">二氧化硫：</label>
                <div class="col-sm-8">
                    <input name="so2" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">采集时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="colltime" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/environment"
        $("#form-environment-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-environment-add').serialize());
            }
        }

        $("input[name='colltime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>